package cn.doitedu.datayiee_service17.controller;

import cn.doitedu.datayiee_service17.pojo.LoudouEvent;
import cn.doitedu.datayiee_service17.pojo.LoudouParams;
import cn.doitedu.datayiee_service17.pojo.LoudouRes;
import cn.doitedu.datayiee_service17.service.ImpalaLoudouAnalyseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 漏斗模型分析
 * impala引擎驱动
 */

@RestController
public class ImpalaLoudouAnalyseController {

    @Autowired
    ImpalaLoudouAnalyseService service;

    @RequestMapping(value="/hello",method = RequestMethod.POST)
    public String hello(String name){
        return "hello "+name;
    }


    @RequestMapping(value="/impala/loudou",method = RequestMethod.POST)
    public List<LoudouRes> queryLoudou(@RequestBody  LoudouParams params){

        List<LoudouRes> loudouRes = service.genSql(params);

        return loudouRes;
    }

}
